<template>
    <div>
        <input type="text" v-model="message" />
        <h2>{{ message }}</h2>
    </div>
</template>

<script>
import { ref } from 'vue'
import debounceRef from './hooks/useDebounceRef.js'
export default {
    setup() {
        // const message = ref("Hello World") 
        const message = debounceRef("Hello World",300)  //为0.3s
        // const message = debounceRef("Hello World")   默认为1s
        return {
            message
        }
    }
}
</script>

<style lang="scss" scoped>
</style>